package com.blyat.xsoft.kernel.restful.mapper;


import com.blyat.xsoft.kernel.restful.entity.BaseEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author syh
 * @date 2019/10/15
 **/
public interface BaseMapper<T extends BaseEntity> {

    T getById(String id);

    List<T> findByPage(Map<String, Object> params/*,
                           @Param("page") Page page*/);

    int insert(T t);

    int batchInsert(@Param("list") List<T> list);

    int update(T t);

    int batchUpdate(@Param("list") List<T> list);

    int delete(T t);

    int deleteByIds(String[] ids);
}
